﻿package net.wangit.dev.wizard;

import java.util.List;

import net.wangit.dev.wizard.element.AAddButton;
import net.wangit.dev.wizard.element.ARemoveButton;
import net.wangit.dev.wizard.element.ASaveActionButton;
import net.wangit.dev.wizard.unit.AListUnit;


public class OneTableSuiteProcessor5 extends OneTableSuiteProcessor {

	public OneTableSuiteProcessor5() {
	}

	protected void createUnits() throws Exception {
		AListUnit.create(db, domain, groupId, listUnitId, listUnitName,
				tableName, queryUnitId, null, true, 1, false, null);
		List<String> elements = Table2Unit.create(db, listUnitId, tableName,
				2, null);
		AAddButton.create(db, ac, listUnitId, elements);
		ARemoveButton.create(db, ac, listUnitId, elements);
		ASaveActionButton.create(db, ac, listUnitId, tableName, WizardUtil
				.getUrl(domain, listUnitId, "e"), elements, null, null, null);
	}

	protected String[][] getUnits() {
		return (new String[][] { new String[] { listUnitId, "listunitid" } });
	}
}
